package com.ruoyi.hr.service.impl.welfare.welfareInfo;


import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.hr.domain.Authority;
import com.ruoyi.hr.domain.JUser;
import com.ruoyi.hr.mapper.welfare.welfareInfo.WelfareInfoMapper;
import com.ruoyi.hr.service.welfare.welfareInfo.WelfareInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class WelfareInfoServiceImpl implements WelfareInfoService {

    @Autowired
    private WelfareInfoMapper welfareInfoMapper;

    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public List<Map<String, Object>> findData(JUser jUser, List<Authority> authorities,int isAdmin) {
        return  welfareInfoMapper.findData(jUser,authorities,isAdmin);
    }

    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public Map<String, Object> findNameByPeid(String peid) {
        return welfareInfoMapper.findNameByPeid(peid);
    }
}
